import service from "../utils/service.ts";

export interface Address {
    aCityName:string
    aConsignee:string
    aDetail:string
    aDistrictName:string
    aEmail:string
    aId:string
    aPhone:string
    aProvinceName:string
    aSex:string
    aState:number
    userId:string
}
export const getAddressList = (userId : any) => {
    return service.get('/address/address-list/' + userId);
}
export const addAddress = (address : Address) => {
    return service.post('/address/add', address);
}
export const updateAddress = (address : Address) => {
    return service.put('/address/update', address);
}
export const deleteAddress = (addressId : string) => {
    return service.delete('/address/delete/' + addressId);
}
export const getAddress = (addressId : string) => {
    return service.get('/address/one-address/' + addressId);
}